<template>
  <div class="banner-box">
    <van-swipe :autoplay="3000" style="height:6.3rem" :show-indicators="false">
      <van-swipe-item v-for="(image, index) in images" :key="index">
        <img v-lazy="image" width="100%" style="height:6.2rem"/>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import Vue from "vue";
import { Lazyload } from "vant";
import axios from "axios";
Vue.use(Lazyload);
export default {
  name: "bannermendian",
  data() {
    return {
      images: [],
    };
  },
  created(){
      axios({
        url:"/bannerImgs",
        method:"get"
      }).then((res)=>{
        this.images = res.data;
        // console.log(res.data);
      });
    },
};
</script>

<style scoped>
.banner-box{
    width: 100%;
    height: 6.3rem;
}
</style>
